*** Grading Practices and Achievement Gaps in Political Science Education
*** Replication .do file for JPSE

* Use "EquityData FINAL.dta" File


* Figures and tables 
* DFWrate histogram (DV)
sum DFWrate, d

hist DFWrate, percent fcolor(ltblue) lcolor(navy) title("DFW Rate", color(black)) ///
	xtitle("DFW Rate, in Percent") ///
	graphregion(fcolor(white))  ///
	caption("Sample size = 193; Mean = 11.9; Median = 10.9", size(small))


* Equitygap histogram (DV)
sum Equitygap, d

hist Equitygap, percent fcolor(eltgreen) lcolor(navy) title("Equity Gap", color(black)) ///
	xtitle("Equity Gap, in Percent")  ///
	graphregion(fcolor(white)) xlabel(-30(10)50) ///
	caption("Sample size = 193; Mean = 4.0; Median = 3.3", size(small))

		
* DFWrateURM histogram (DV)
sum DFWrateURM, d

hist DFWrateURM, percent fcolor(ltbluishgray) lcolor(navy) title("DFW Rate for Underrepresented Minorities", color(black)) ///
	xtitle("DFW Rate, in Percent") xlabel(0(10)50) xlabel(0 "0" 10 "10" 20 "20" 30 "30" 40 "40" 50 "50") ///
	graphregion(fcolor(white))  ///
	caption("Sample size = 193; Mean = 14.0; Median = 12.5", size(small))


* DFWrateNonURM histogram (DV)
sum DFWrateNonURM, d

hist DFWrateNonURM, percent fcolor(ltkhaki) lcolor(navy) title("DFW Rate for Non-Underrepresented Minorities", color(black)) ///
	xtitle("DFW Rate, in Percent") xlabel(0(10)40) xlabel(0 "0" 10 "10" 20 "20" 30 "30" 40 "40") ///
	graphregion(fcolor(white))  ///
	caption("Sample size = 193; Mean = 9.9; Median = 8.7", size(small))

	
* modality and yearsem
tab modality yearsem	

	
	

* Regression 
xi: regress DFWrate RecentAssgnWeight Attendance0 LateWork0 GradeCalculation InstructorFemale lecturer GE lowerdiv enrollment PercentURM i.yearsem, cluster(CourseNumber) 

xi: regress Equitygap RecentAssgnWeight Attendance0 LateWork0 GradeCalculation InstructorFemale lecturer GE lowerdiv enrollment PercentURM i.yearsem, cluster(CourseNumber)

xi: regress DFWrateURM RecentAssgnWeight Attendance0 LateWork0 GradeCalculation InstructorFemale lecturer GE lowerdiv enrollment PercentURM i.yearsem, cluster(CourseNumber)

xi: regress DFWrateNonURM  RecentAssgnWeight Attendance0 LateWork0 GradeCalculation InstructorFemale lecturer GE lowerdiv enrollment PercentURM i.yearsem, cluster(CourseNumber)

